package com.daedalus.ushtrimePrintimi.komplekse;/*
 * Created with IntelliJ IDEA.
 * Author: Kostika Gorica
 * Date: 12-10-28
 * Time: 8.52.MD
 */

public class tapet {
    static final int GJERESI = 8;      // mund te jete cdo numer cift
    static final int GJATESIA = 8;

    public static void main(String[] args){
        // rreshti i pare ("+-----------------+")
        System.out.print("+");
        for (int i=2; i<GJERESI; i++){
            System.out.print("-");
        }
        System.out.println("+");

        // percaktojme numrin e hapesirave per rreshtin e pare te figures
        int nr_hapesira=0;
        int nr_yje = GJERESI-4;

        // gjysma e gjysmes se siperme, pra 1/4 e figures:
        for (int i=1; i<GJATESIA/2; i++){
            System.out.print("|");
            for (int j=0;j<nr_hapesira;j++)
                System.out.print(" ");
            System.out.print("\\");
            for (int j=0;j<nr_yje;j++)
                System.out.print("*");
            System.out.print("/");
            for (int j=0;j<nr_hapesira;j++)
                System.out.print(" ");
            System.out.println("|");

            nr_hapesira++;
            nr_yje-=2;
        }
        nr_hapesira--;
        nr_yje+=2;
        for (int i=1; i<GJATESIA/2; i++){
            System.out.print("|");
            for (int j=0;j<nr_hapesira;j++)
                System.out.print(" ");
            System.out.print("/");
            for (int j=0;j<nr_yje;j++)
                System.out.print("*");
            System.out.print("\\");
            for (int j=0;j<nr_hapesira;j++)
                System.out.print(" ");
            System.out.println("|");

            nr_hapesira--;
            nr_yje+=2;
        }
        System.out.print("+");
        for (int i=2; i<GJERESI; i++){
            System.out.print("-");
        }
        System.out.println("+");

        nr_hapesira=GJERESI/2-2;
        nr_yje = 0 ;

        // gjysma e gjysmes se siperme, pra 1/4 e figures:
        for (int i=1; i<GJATESIA/2; i++){
            System.out.print("|");
            for (int j=0;j<nr_hapesira;j++)
                System.out.print(" ");
            System.out.print("/");
            for (int j=0;j<nr_yje;j++)
                System.out.print("*");
            System.out.print("\\");
            for (int j=0;j<nr_hapesira;j++)
                System.out.print(" ");
            System.out.println("|");

            nr_hapesira--;
            nr_yje+=2;
        }
        nr_hapesira++;
        nr_yje-=2;
        for (int i=1; i<GJATESIA/2; i++){
            System.out.print("|");
            for (int j=0;j<nr_hapesira;j++)
                System.out.print(" ");
            System.out.print("\\");
            for (int j=0;j<nr_yje;j++)
                System.out.print("*");
            System.out.print("/");
            for (int j=0;j<nr_hapesira;j++)
                System.out.print(" ");
            System.out.println("|");

            nr_hapesira++;
            nr_yje-=2;
        }
        System.out.print("+");
        for (int i=2; i<GJERESI; i++){
            System.out.print("-");
        }
        System.out.println("+");

    }
}
